<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions"  prefix="fn" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="${pageContext.request.contextPath }/h-ui/css/H-ui.min.css"
	rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/h-ui/css/H-ui.admin.css"
	rel="stylesheet" type="text/css" />
<link
	href="${pageContext.request.contextPath }/h-ui/lib/icheck/icheck.css"
	rel="stylesheet" type="text/css" />
<link
	href="${pageContext.request.contextPath }/h-ui/lib/Hui-iconfont/1.0.6/iconfont.css"
	rel="stylesheet" type="text/css" />
<link
	href="${pageContext.request.contextPath }/h-ui/lib/webuploader/0.1.5/webuploader.css"
	rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/h-ui/lib/select2.css"
	rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<style type="text/css">
.inputcheck{width:100px;float:left;}
</style>
<title>修改花型的属性</title>
</head>
<body>
	<div class="pd-20">
		<form id="form" action="../Patterns/UpdateFilter" method="post" class="form "
			id="update_PattrenFilter_Form">
			<input type="hidden" id="pIds" name="pIds" value="${parent }">
			<div class="row cl">
				<label class="form-label col-2"><span class="c-red">*</span>颜色：</label>
				<div class="formControls col-9">
							<c:forEach items="${color }" var="p">
							<c:set var="sss" value=""></c:set>
							<c:forEach items="${fn:split(parent1.pColor,',')}" var="it">
								<c:if test="${it==p.ptId }">
								<c:set var="sss" value="checked"></c:set>
								</c:if> 
							</c:forEach>
							<div class="inputcheck"><input type="checkbox" ${sss } name="pColor" value="${p.ptId }"><img ${p.ptName }/></div>
							</c:forEach>
				</div>
				<div class="col-1"> </div>
			</div>
			<div class="row cl">
				<label class="form-label col-2"><span class="c-red">*</span>元素：</label>
				<div class="formControls col-9">
						<c:forEach items="${element }" var="p">
						<c:set var="sss" value=""></c:set>
							<c:forEach items="${fn:split(parent1.pElement,',')}" var="it">
								<c:if test="${it==p.ptId }">
								<c:set var="sss" value="checked"></c:set>
								</c:if> 
							</c:forEach>
							<div class="inputcheck"><input type="checkbox" ${sss } name="pElement" value="${p.ptId }">${p.ptName }</div>
					</c:forEach>
					<div class="clearfix"></div>
				</div>
				<div class="col-1"> </div>
			</div>
			<div class="row cl">
				<label class="form-label col-2"><span class="c-red">*</span>类别：</label>
				<div class="formControls col-9">
						<c:forEach items="${category }" var="p">
						<c:set var="sss" value=""></c:set>
							<c:forEach items="${fn:split(parent1.pCategory,',')}" var="it">
								<c:if test="${it==p.ptId }">
								<c:set var="sss" value="checked"></c:set>
								</c:if> 
							</c:forEach>
						<div class="inputcheck"><input type="checkbox" ${sss } name="pCategory" value="${p.ptId }">${p.ptName }</div>
					</c:forEach>
					<div class="clearfix"></div>
				</div>
				<div class="col-1"> </div>
			</div>
			<div class="row cl">
				<label class="form-label col-2"><span class="c-red"></span>主题：</label>
				<div class="formControls col-9">
						<c:forEach items="${theme }" var="p">
						<c:set var="sss" value=""></c:set>
							<c:forEach items="${fn:split(parent1.tId,',')}" var="it">
								<c:if test="${it==p.id }">
								<c:set var="sss" value="checked"></c:set>
								</c:if> 
							</c:forEach>
						<div class="inputcheck"><input type="radio" ${sss } name="tId" value="${p.id }">${p.name }</div>
					</c:forEach>
					<div class="clearfix"></div>
				</div>
				<div class="col-1"> </div>
			</div>
			<div class="row cl">
				<label class="form-label col-2"><span class="c-red"></span>秀场同步：</label>
				<div class="formControls col-9">
						<c:forEach items="${show }" var="p">
						<c:set var="sss" value=""></c:set>
							<c:forEach items="${fn:split(parent1.ssId,',')}" var="it">
								<c:if test="${it==p.id }">
								<c:set var="sss" value="checked"></c:set>
								</c:if> 
							</c:forEach>
							<div class="inputcheck"><input type="radio" ${sss } name="ssId" value="${p.id }">${p.name }</div>
						</c:forEach>
						<div class="clearfix"></div>
				</div>
				<div class="col-1"> </div>
			</div>
			<div class="row cl">
				<label class="form-label col-2"><span class="c-red">*</span>花位：</label>
				<div class="formControls col-9">
						<c:forEach items="${location }" var="p">
						<c:set var="sss" value=""></c:set>
							<c:forEach items="${fn:split(parent1.pLocation,',')}" var="it">
								<c:if test="${it==p.ptId }">
								<c:set var="sss" value="checked"></c:set>
								</c:if> 
							</c:forEach>
							<div class="inputcheck"><input type="checkbox" ${sss } name="pLocation" value="${p.ptId }">${p.ptName }</div>
						</c:forEach>
						<div class="clearfix"></div>
				</div>
				<div class="col-1"> </div>
			</div>
			
			<!-- <div class="row cl">
				<label class="form-label col-1">中英文：</label>
				<div class="formControls col-5"> 
					<select name="club" class="select-box" message="请选择语言" datatype="*" nullmsg="中英文不能为空">
						<option value="">请选择</option>
						<option value="0">中文</option>
						<option value="1">英文</option>
					</select>
				</div>
				<div class="col-4"> </div>
			</div> -->
			
			
			<div class="row cl">
				<label class="form-label col-3"><span class="c-red">*</span>买断价格：</label>
				<div class="formControls col-5">
					<input type="text" class="input-text" value="${parent1.pBuyoutPrice }" onkeyup="value=value.replace(/[^\d.]/g,'')"
						placeholder="请输入买断价格" id="pBuyoutPrice" name="pBuyoutPrice" maxlength="10"
						datatype="/^(0|([1-9]\d*))(\.\d{2})?$/" nullmsg="买断价格不能为空" >
				</div>
				<div class="col-4"> </div>
			</div>
			<div class="row cl">
				<div class="col-9 col-offset-3">
					<button class="btn btn-primary save" type="submit">保存</button>
					<a class="btn btn-primary" onclick="closethis()">取消</a>
				</div>
			</div>
		</form>
	</div>
	<script type="text/javascript"
		src="${pageContext.request.contextPath }/h-ui/lib/jquery/1.9.1/jquery.min.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath }/h-ui/lib/icheck/jquery.icheck.min.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath }/h-ui/lib/Validform/5.3.2/Validform.min.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath }/h-ui/lib/layer/2.1/layer.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath }/h-ui/js/H-ui.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath }/h-ui/js/H-ui.admin.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath }/h-ui/lib/My97DatePicker/WdatePicker.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath }/h-ui/lib/webuploader/0.1.5/webuploader.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath }/h-ui/uploadSingleImg.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath }/h-ui/jqthumb/jqthumb.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath }/h-ui/tableBtnGroup.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath }/h-ui/lib/select2.js"></script>
	<script type="text/javascript">
		function closethis() {
			var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
			parent.layer.close(index);
		}
		$(function() {
			//带图片
			$("#pColor").select2({
				templateResult : formatState,
				templateSelection : formatState
			});
		});
		//下拉框图片
		function formatState(state) {
			if (!state.id) {
				return state.text;
			}
			var $state = $('<span><img  ' + state.text + ' /></span>');
			return $state;
		};
		$(function(){
			var demo=$("#form").Validform({
				tiptype:2,
				label:".label",
				showAllError:true,
				datatype:{
					"zh1-6":/^[\u4E00-\u9FA5\uf900-\ufa2d]{1,6}$/
				},
				ajaxPost:true,
				callback:function(result){
					 var status=result.msg.status;
					 var desc=result.msg.desc;
					 if(status == 0){
						 
						 var index = parent.layer.getFrameIndex(window.name);
					    	window.parent.location.reload();
					    	parent.layer.close(index);//关闭弹框 
					    	layer.close(index1);
						
					 }
					 }
			});
			
			//通过$.Tipmsg扩展默认提示信息;
			//$.Tipmsg.w["zh1-6"]="请输入1到6个中文字符！";
			demo.tipmsg.w["zh1-6"]="请输入1到6个中文字符！";
			
			demo.addRule([
			{
				ele:".inputxt:eq(0)",
				datatype:"*"
			},
			{
				ele:":checkbox",
				datatype:"*"
			}/* ,{
				ele:":radio",
				datatype:"*"
			} */
			]);
			
			
		
		}); 
	</script>
</body>
</html>